from django.contrib import admin
from .models import User, Article, Topic, Comment


class UserAdmin(admin.ModelAdmin):
    list_display = ("id", "username", "password", "email", "phone", "isadmin")


class ArticlesAdmin(admin.ModelAdmin):
    list_display = ("id", "title", "brief","content","author", "topic", "time")


class CommentsAdmin(admin.ModelAdmin):
    list_display = ("id", "article", "comment_author", "comment_time")


class TopicsAdmin(admin.ModelAdmin):
    list_display = ("id", "topicname")

admin.site.register(Article, ArticlesAdmin)
admin.site.register(Comment, CommentsAdmin)
admin.site.register(Topic, TopicsAdmin)
admin.site.register(User, UserAdmin)
